package com.zx.service;

import com.zx.bean.Firm;
import com.zx.bean.User;
import com.zx.mapper.UserMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    private UserMapper userMapper;

    //添加
    public int addUser(User user){
        return userMapper.addUser(user);
    }

    //删除
    public int delUser(int id){
        return userMapper.delUser(id);
    }
    //修改
    public User updateUser(int id){
        return userMapper.updateUser(id);
    }
    //查询单个
    public User findOneUser(int id){
        return userMapper.findOneUser(id);
    }
    //查询全部
    public List<User> findAllUser(){
        return userMapper.findAllUser();
    }
}
